From: Michael Albinus Date: Sat, 29 May 2004 22:42:06 +0000 (+0000) Subject: (file-remote-p): Apply file name handler for operation X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~22231 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=80dbc387c05ccb475a5abdc12d61fc1ced6909ac;p=emacs.git (file-remote-p): Apply file name handler for operation `file-remote-p'. It isn' a property any longer. (file-relative-name): `fh' and `fd' get the required value via `find-file-name-handler' already. --- diff --git a/lisp/files.el b/lisp/files.el index 27e0ded28e2..94e6bfae32c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -642,9 +642,10 @@ This is an interface to the function `load'." (defun file-remote-p (file) "Test whether FILE specifies a location on a remote system." - (let ((handler (find-file-name-handler file 'file-local-copy))) + (let ((handler (find-file-name-handler file 'file-remote-p))) (if handler - (get handler 'file-remote-p)))) + (funcall handler 'file-remote-p file) + nil))) (defun file-local-copy (file) "Copy the file FILE into a temporary file on this machine. @@ -2903,10 +2904,8 @@ on a DOS/Windows machine, it returns FILENAME on expanded form." (file-name-as-directory (expand-file-name (or directory default-directory)))) (setq filename (expand-file-name filename)) - (let ((hf (find-file-name-handler filename 'file-local-copy)) - (hd (find-file-name-handler directory 'file-local-copy))) - (when (and hf (not (get hf 'file-remote-p))) (setq hf nil)) - (when (and hd (not (get hd 'file-remote-p))) (setq hd nil)) + (let ((hf (find-file-name-handler filename 'file-remote-p)) + (hd (find-file-name-handler directory 'file-remote-p))) (if ;; Conditions for separate trees (or ;; Test for different drives on DOS/Windows